package cn.liontalk.concurrent.shuati;


import java.util.Scanner;

/**
 * 统计字符
 */

public class Main8 {


    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String readContent = sc.nextLine();
            int blankNum = 0;
            int cNum = 0;
            int other = 0;
            int isNumber = 0;
            char[] a = readContent.toCharArray();
            for (int i = 0; i < a.length; i++) {
                if ((a[i] >= 'A' && a[i] <= 'Z') || (a[i] >= 'a' && a[i] <= 'z')) {
                    cNum++;
                } else if (a[i] >= '0' && a[i] <= '9') {
                    isNumber++;
                } else if (a[i] == ' ') {
                    blankNum++;
                } else {
                    other++;
                }
            }
            System.out.println(cNum);
            System.out.println(blankNum);
            System.out.println(isNumber);
            System.out.println(other);
        }
    }
}
